package com.microservice.chapter1.pojo;


import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;


/**
 *
 * @Component 表示 springBoot会启动加载这个类，必须是一个组件才能获取配置文件的值。
 *
 * @ConfigurationProperties 绑定YMAL的配置到该类上。
 *  prefix 表示在配置文件中去:user开头的

 *
 */
@Component
@ConfigurationProperties(prefix = "user")
public class User {
    
    private String userName;

    private int age;

    private Map<String,Object> maps;
    private List<Object> lists;


    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public Map<String, Object> getMaps() {
        return maps;
    }

    public void setMaps(Map<String, Object> maps) {
        this.maps = maps;
    }

    public List<Object> getLists() {
        return lists;
    }

    public void setLists(List<Object> lists) {
        this.lists = lists;
    }
}
